" vimrc_noReplaceUncommonCharacters
" Replace common non-UTF-8 characters
function! ReplaceUncommonCharactersFunction()
  normal mp
  " We need to protect this script itself and similar places where non-UTF characters listed below
  " should stay intact.
  " To achieve this, add the text vimrc_noReplaceUncommonCharacters anywhere in the doc
  let s:noReplaceUncommonCharacters=0
  g/vimrc_noReplaceUncommonCharacters/let s:noReplaceUncommonCharacters=1
  if (s:noReplaceUncommonCharacters)
  else
    %s/Å/A
    %s/–/-
    %s/—/-
    %s/―/-
    %s/‘/'
    %s/’/'
    %s/“/"
    %s/”/"
    %s/′/'
  endif
  normal `pzz
endfunction

command! ReplaceUncommonCharacters silent! call ReplaceUncommonCharactersFunction()

" Find non-UTF-8 characters
command! SearchUncommonCharacters /[^\x00-\x7F]

